package com.gpay.erp.services.common.impl;

import com.gpay.erp.services.common.GlobalStatus;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * Created by Administrator on 2015/8/18 0018.
 */
public class GlobalStatusImpl implements GlobalStatus {
	private Map sexMap;// 性别
	private Map contractStatus;// 合同状态
	private Map status;// 采购申请状态
	private Map orgState;// 产地状态
	private Map orderStatus;// 销售合同状态
	private Map userStatus;// 用户状态
	private Map payMethod;// 支付方式
	private Map taxRate;// 税率
	private Map paidStatus;// 付款申请状态
	private Map paymentOrderType; //付款类型
	private Map currencys; //币种
	private Map storageStatus; //入库状态

	@Override
	public Map getStorageStatus() {
		return storageStatus;
	}

	@Override
	public void setStorageStatus(Map storageStatus) {
		this.storageStatus = storageStatus;
	}

	@Override
	public  String getStorageStatus(int storageStatus1) {
		String status1 = null;
		switch (storageStatus1) {
			case 0:
				status1=storageStatus.get("0").toString();
				break;
			case 1:
				status1=storageStatus.get("1").toString();
				break;
			default:
				status1=storageStatus.get("0").toString();
				break;
		}
		return status1;
	}
	@Override
	public Map getPaidStatus() {
		return paidStatus;
	}

	@Override
	public void setPaidStatus(Map paidStatus) {
		this.paidStatus = paidStatus;
	}

	@Override
	public Map getPayMethod() {
		return payMethod;
	}

	@Override
	public void setPayMethod(Map payMethod) {
		this.payMethod = payMethod;
	}

	@Override
	public Map getTaxRate() {
		return taxRate;
	}

	@Override
	public void setTaxRate(Map taxRate) {
		this.taxRate = taxRate;
	}

	@Override
	public Map getUserStatus() {
		return userStatus;
	}

	@Override
	public void setUserStatus(Map userStatus) {
		this.userStatus = userStatus;
	}

	@Override
	public Map getOrderStatus() {
		return orderStatus;
	}

	@Override
	public void setOrderStatus(Map orderStatus) {
		this.orderStatus = orderStatus;
	}

	@Override
	public Map getOrgState() {
		return orgState;
	}

	@Override
	public void setOrgState(Map orgState) {
		this.orgState = orgState;
	}

	@Override
	public Map getContractStatus() {
		return contractStatus;
	}

	@Override
	public void setContractStatus(Map contractStatus) {
		this.contractStatus = contractStatus;
	}

	@Override
	public Map getSexMap() {
		return sexMap;
	}

	@Override
	public void setSexMap(Map sexMap) {
		this.sexMap = sexMap;
	}

	@Override
	public Map getStatus() {
		return status;
	}

	@Override
	public void setStatus(Map status) {
		this.status = status;
	}

	@Override
    public Map getPaymentOrderType() {
		return paymentOrderType;
	}

	public void setPaymentOrderType(Map paymentOrderType) {
		this.paymentOrderType = paymentOrderType;
	}

	@Override
    public Map getCurrencys() {
		return currencys;
	}

	public void setCurrencys(Map currencys) {
		this.currencys = currencys;
	}

	//采购合同状态转换
	@Override
	public  String getContractStatus(int contractS) {
		String status = null;
			switch (contractS) {
				case 0:
					status=contractStatus.get("0").toString();
					break;
				case 1:
					status=contractStatus.get("1").toString();
					break;
				case 2:
					status=contractStatus.get("2").toString();
					break;
				case 3:
					status=contractStatus.get("3").toString();
					break;
				default:
					status=contractStatus.get("0").toString();
					break;
			}
		return status;
	}

	//采购申请状态转换
	@Override
	public  String getApplicationStatus(int appplicationS) {
		String status1 = null;
			switch (appplicationS) {
				case 0:
					status1=status.get("0").toString();
					break;
				case 1:
					status1=status.get("1").toString();
					break;
				case 2:
					status1=status.get("2").toString();
					break;
				case 3:
					status1=status.get("3").toString();
					break;
				case 4:
					status1=status.get("4").toString();
					break;
				default:
					status1=status.get("0").toString();
					break;
			}
		return status1;
	}
	//付款申请状态
	@Override
	public  String getPaidApplicationStatus(int paidAppplicationS) {
		String status1 = null;
		switch (paidAppplicationS) {
			case 0:
				status1=paidStatus.get("0").toString();
				break;
			case 1:
				status1=paidStatus.get("1").toString();
				break;
			case 2:
				status1=paidStatus.get("2").toString();
				break;
			case 3:
				status1=paidStatus.get("3").toString();
				break;
			case 4:
				status1=paidStatus.get("4").toString();
				break;
			case 5:
				status1=paidStatus.get("5").toString();
				break;
			default:
				status1=paidStatus.get("0").toString();
				break;
		}
		return status1;
	}
	//币种
	@Override
	public  String getCurrencys(int currencys1) {
		String status1 = null;
		switch (currencys1) {
			case 0:
				status1=currencys.get("0").toString();
				break;
			case 1:
				status1=currencys.get("1").toString();
				break;
			case 2:
				status1=currencys.get("2").toString();
				break;
			default:
				status1=currencys.get("0").toString();
				break;
		}
		return status1;
	}

	@Override
	public  String getPayMethod(int payMethodS) {
		String status1 = null;
		switch (payMethodS) {
			case 0:
				status1=payMethod.get("0").toString();
				break;
			case 1:
				status1=payMethod.get("1").toString();
				break;
			case 2:
				status1=payMethod.get("2").toString();
				break;
			case 3:
				status1=payMethod.get("3").toString();
				break;
			case 4:
				status1=payMethod.get("4").toString();
				break;
			case 5:
				status1=payMethod.get("5").toString();
				break;
			case 6:
				status1=payMethod.get("6").toString();
				break;
			case 7:
				status1=payMethod.get("7").toString();
				break;
			case 8:
				status1=payMethod.get("8").toString();
				break;
			default:
				status1=payMethod.get("0").toString();
				break;
		}
		return status1;
	}

}
